CC = gcc
AS = gasm
AR = ar

GCC     = ../../gccsh

LIBDIR  = .
INCDIR  = ../include
OBJDIR  = .
SRCDIR  = .
CFLAGS  = -Wall -m2 -D_SH -DMODEL_S -(GCC)/include -I$(INCDIR)
ASFLAGS =
ARFLAGS = rv

include	$(SRCDIR)/objects

all: $(TARGET)

$(TARGET): $(OBJS)
	$(AR) $(ARFLAGS) $(_ARFLAGS) $@ $?

.SUFFIXES:
.SUFFIXES: .a .o .src .c

$(OBJDIR)/%.o: $(SRCDIR)/%.c
	$(CC) -c $(CFLAGS) $(_CFLAGS) -o $@ $<

$(OBJDIR)/%.o: $(SRCDIR)/%.src
	$(AS) $< $(ASFLAGS) $(_ASFLAGS) -o $@

clean:
	del *.o
